#include<vector>
#include<bits/stdc++.h>
using namespace std;
int T,n;
/*
string dfs(vector<int> a,vector<int> b,int center,bool* used){
	if(a.empty()&&b.size()+1==center*2)return "";
	if(a.empty()&&b.size()+1!=center*2)return "-1";
	vector<int> i,j;
	if(center==-1){
		
		i=a,j=b;
		if(j.back()==i.front())center=j.size()-1;
		j.push_back(i.front());
		i.erase(i.begin());
		used[j.back()]=1;
		string tmp=dfs(i,j,center,used);
		if(tmp!="-1")return("L"+tmp);
		used[j.back()]=0;
		center=-1;
		/////////////////////////////////////////////////////
		i=a,j=b;
		if(i.back()==j.front())center=0;
		j.insert(j.begin(),i.back());
		i.erase(i.end()--);///
		used[j.front()]=1;
		tmp=dfs(i,j,center,used);
		if(tmp!="-1")return("R"+tmp);
		used[j.front()]=0;
		center=-1;
	}
	else{
		if(center*2>=b.size()){
			if(b[2*center-b.size()]==a.front()){
				i=a,j=b;
				j.push_back(i.front());
				i.erase(i.begin());
				string tmp=dfs(i,j,center,used);
				if(tmp!="-1")return("L"+tmp);
			}
			i=a,j=b;
			if(i.back()==j.front())center=0;
			j.insert(j.begin(),i.back());
			i.erase(i.end()--);
			used[j.front()]=1;
			string tmp=dfs(i,j,center,used);
			if(tmp!="-1")return("R"+tmp);
		}else{
			i=a,j=b;
			j.push_back(i.front());
			i.erase(i.begin());
			used[j.back()]=1;
			string tmp=dfs(i,j,center,used);
			used[j.back()]=0;
			if(tmp!="-1")return("L"+tmp);
			if(b[2*center-b.size()]==a.front()){
				i=a,j=b;
				if(i.back()==j.front())center=0;
				j.insert(j.begin(),i.back());
				i.erase(i.end()--);
				string tmp=dfs(i,j,center,used);
				if(tmp!="-1")return("R"+tmp);
			}
		}
	}
	return "-1";
}
int main(){
	freopen("palin.in","r",stdin);
	freopen("palin.out","w",stdout);
	
	cin>>T;
	for(int t=0;t<T;t++){
		cin>>n;
		vector<int> a;
		for(int i=0;i<n;i++){
			int tmp;
			a.push_back(tmp);
		}
		bool used[100010];
		memset(used,0,sizeof(used));
		cout<<dfs(a,vector<int>(),-1,used)<<endl;
	}
	return 0;
}*/
int main(){
	freopen("palin.in","r",stdin);
	freopen("palin.out","w",stdout);
	cin>>T;
	for(int t=0;t<T;t++){cout<<"-1"<<endl;}
}
